		$info = array();
		if(isset($_SESSION['cart'])){
			foreach ($_SESSION['cart'] as $key => $value) {
				$info[$key]['glid'] = $value['glid'];
				$info[$key]['quantity'] = $value['quantity'];
				$goodsList = M('goods_list')->field('combine,gid,number')->where(array('glid' => $value['glid']))->find();
				$goods = M('goods')->field('gname,shopprice')->where(array('gid' => $goodsList['gid']))->find();
				$detail = M('detail')->field('small')->where(array('gid' => $goodsList['gid']))->find();
				$attr = explode(',', $goodsList['combine']);
				$color = M('goods_attr')->field('gtvalue,added')->where(array('gtid' => $attr[0]))->find();
				$size = M('goods_attr')->field('gtvalue,added')->where(array('gtid' => $attr[1]))->find();
				$info[$key]['gname'] = $goods['gname'];
				$info[$key]['price'] = $goods['shopprice'] + $color['added'] + $size['added'];
				$info[$key]['sum'] = $info[$key]['price'] * $value['quantity'];
				$pics =explode(',', $detail['small']);
				$info[$key]['pic'] = $pics[0];
				$info[$key]['color'] = $color['gtvalue'];
				$info[$key]['size'] = $size['gtvalue'];
				$info[$key]['session_key'] = $key;
				$info[$key]['gid'] = $goodsList['gid'];
				$info[$key]['number'] = $goodsList['number'];

			}
		}

		$totalPrice = 0;
		foreach ($info as $v) {
			$totalPrice += $v['sum'];
		}

		$this->totalPrice = $totalPrice;
		$this->info = $info;

		//将组合好的数组存入session，以便在 确认订单信息页 方法中用
		$_SESSION['info'] = $info;

		// p($info);die;

		$this->display();
	}
			{{if value="!isset($_SESSION['goods'])"}}
		<div class='no_goods'>
			<p>您的购物车还是空的，赶快去挑选商品吧！</p>
			<p>去看看大家都喜欢的前往<a href="{{U('Index/index')}}">首页</a></p>
			
		</div>
		{{else}}
		{{endif}}